/* crypto/rand/randommanager.h */
#ifndef HEADER_RANDOMMANAGER_H
#define HEADER_RANDOMMANAGER_H

#if OPENSSL_WINRT_DESKTOP || OPENSSL_WINRT_PHONE

#include <wrl.h>
#include <windows.storage.streams.h>
#include <windows.security.cryptography.h>

using ABI::Windows::Security::Cryptography::ICryptographicBufferStatics;
using Microsoft::WRL::ComPtr;

class RandomManager
{
private:
	ComPtr<ICryptographicBufferStatics> cryptographicBuffer;
	RandomManager();
	static RandomManager* randomManager;
public:
	static RandomManager* GetRandomManager();
	void GenerateRandomBytes(BYTE* randBuffer, int length);
	int GenerateRandomNumber();
};
#endif	//OPENSSL_WINRT_DESKTOP || OPENSSL_WINRT_PHONE
#endif	//__RANDOMMANAGER_H__